package com.crm.controller;

import com.crm.commons.domain.ResponseData;
import com.crm.entity.CrmUser;
import com.crm.service.ICrmActivityRemarkService;
import com.crm.vo.ActivityRemark;
import org.springframework.web.bind.annotation.*;
import org.springframework.stereotype.Controller;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author junxian,dou
 * @since 2024-11-25
 */
@RestController
@RequestMapping("/crmActivityRemark")
public class CrmActivityRemarkController extends BaseController {

    @Resource
    private ICrmActivityRemarkService iCrmActivityRemarkService;

    @PostMapping("/saveCreateActivityRemark")
    public ResponseData saveCreateActivityRemark(@RequestBody ActivityRemark remark){
        iCrmActivityRemarkService.saveCreateActivityRemark(remark);
        return ResponseData.success();
    }

    @GetMapping("/deleteActivityRemarkById/{id}")
    public ResponseData deleteActivityRemarkById(@PathVariable String id){
        iCrmActivityRemarkService.removeById(id);
        return ResponseData.success();
    }


    @PostMapping("/updateCreateActivityRemark")
    public ResponseData updateCreateActivityRemark(@RequestBody ActivityRemark remark){
        iCrmActivityRemarkService.updateCreateActivityRemark(remark);
        return ResponseData.success();
    }

}
